package com.szz.demo.controller;

import com.szz.demo.component.NumberComponent;
import com.szz.demo.enums.EnumType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 孙中正
 * @date 2024/4/25 10:11
 */


@RestController
@RequestMapping("/demo")
public class TestController {


    @Autowired
    private NumberComponent numberComponent;


    @GetMapping("/a")
    public String main(@RequestParam("a") String a) {
        return a;
    }



    @GetMapping("/b")
    public  void b(@RequestParam("a") String a) {
        System.out.println(numberComponent.select(EnumType.A, "aa"));
        System.out.println(numberComponent.select(EnumType.B, "aa"));

    }

}
